<html>

<head>
<title>libogg - datatype - ogg_packet</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>

<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<tr>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.6 - 20250616</p></td>
</tr>
</table>

<h1>ogg_packet</h1>

<p><i>declared in "ogg/ogg.h"</i></p>

<p>
The ogg_packet struct encapsulates the data for a single raw packet of data
and is used to transfer data between the ogg framing layer and the handling codec.
<p>

<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
	<td>
<pre><b>
typedef struct {
  unsigned char *packet;
  long  bytes;
  long  b_o_s;
  long  e_o_s;

  ogg_int64_t  granulepos;
  ogg_int64_t  packetno;

} ogg_packet;
</b></pre>
	</td>
</tr>
</table>

<h3>Relevant Struct Members</h3>
<dl>
<dt><i>packet</i></dt>
<dd>Pointer to the packet's data. This is treated as an opaque type by the ogg layer.</dd>
<dt><i>bytes</i></dt>
<dd>Indicates the size of the packet data in bytes.  Packets can be of arbitrary size.</dd>
<dt><i>b_o_s</i></dt>
<dd>Flag indicating whether this packet begins a logical bitstream.  <tt>1</tt> indicates this is the first packet, <tt>0</tt> indicates any other position in the stream.</dd>
<dt><i>e_o_s</i></dt>
<dd>Flag indicating whether this packet ends a bitstream.  <tt>1</tt> indicates the last packet, <tt>0</tt> indicates any other position in the stream.</dd>
<dt><i>granulepos</i></dt>
<dd>A number indicating the position of this packet in the decoded data. This is the last sample, frame or other unit of information ('granule') that can be completely decoded from this packet.</dd>
<dt><i>packetno</i></dt>
<dd>Sequential number of this packet in the ogg bitstream.<dd>
</dl>


<br><br>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2000-2021 Xiph.Org Foundation</p></td>
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
</tr><tr>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.6 - 20250616</p></td>
</tr>
</table>

</body>

</html>
